package com.tamtamy.jtta.data;

import java.util.ArrayList;
import java.util.Date;

import org.apache.commons.lang.builder.ToStringBuilder;

public class Notice {
	
	protected long id = 0;
	protected Date created = null;
	protected String userId = null;
	protected String noticeType = null;
	protected String targetId = null;
	protected String title = null;
	protected String description = null;
	protected String permalink = null;
	protected boolean thumbnailPresent = false;
	protected String thumbnailSmall = null;
	protected String thumbnailRect = null;
	protected String thumbnailMedium = null;
	protected String thumbnailOriginal = null;
	
	public Notice(long id, Date created, String userId, String noticeType,	String targetId, String title, String description, String permalink, boolean thumbnailPresent, String thumbnailSmall, String thumbnailRect, String thumbnailMedium, String thumbnailOriginal) {
		super();
		this.id = id;
		this.created = created;
		this.userId = userId;
		this.noticeType = noticeType;
		this.targetId = targetId;
		this.title = title;
	    this.description = description;
	    this.permalink = permalink;
	    this.thumbnailPresent = thumbnailPresent;
	    this.thumbnailSmall = thumbnailSmall;
	    this.thumbnailRect = thumbnailRect;
	    this.thumbnailMedium = thumbnailMedium;
	    this.thumbnailOriginal = thumbnailOriginal;
	}
	
	public Notice() {
		super();
		this.id = 0;
		this.created = null;
		this.userId = null;
		this.noticeType = null;
		this.targetId = null;
		this.title = null;
		this.description = null;
		this.permalink = null;
		this.thumbnailPresent = false;
		this.thumbnailSmall = null;
		this.thumbnailRect = null;
		this.thumbnailMedium = null;
		this.thumbnailOriginal = null;
	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public Date getCreated() {
		return created;
	}

	public void setCreated(Date created) {
		this.created = created;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getNotceType() {
		return noticeType;
	}

	public void setNotceType(String notceType) {
		this.noticeType = notceType;
	}

	public String getTargetId() {
		return targetId;
	}

	public void setTargetId(String targetId) {
		this.targetId = targetId;
	}
	
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getPermalink() {
		return permalink;
	}

	public void setPermalink(String permalink) {
		this.permalink = permalink;
	}

	public Boolean getThumbnailPresent() {
		return thumbnailPresent;
	}

	public void setThumbnailPresent(Boolean thumbnailPresent) {
		this.thumbnailPresent = thumbnailPresent;
	}

	public String getThumbnailSmall() {
		return thumbnailSmall;
	}

	public void setThumbnailSmall(String thumbnailSmall) {
		this.thumbnailSmall = thumbnailSmall;
	}

	public String getThumbnailRect() {
		return thumbnailRect;
	}

	public void setThumbnailRect(String thumbnailRect) {
		this.thumbnailRect = thumbnailRect;
	}

	public String getThumbnailMedium() {
		return thumbnailMedium;
	}

	public void setThumbnailMedium(String thumbnailMedium) {
		this.thumbnailMedium = thumbnailMedium;
	}

	public String getThumbnailOriginal() {
		return thumbnailOriginal;
	}

	public void setThumbnailOriginal(String thumbnailOriginal) {
		this.thumbnailOriginal = thumbnailOriginal;
	}

	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}
	
	public static ArrayList<String> getFilters(){
		ArrayList<String> filters = new ArrayList<String>();;
		
		ArrayList<String> noticeContent = NoticeContent.getFilters();		
		filters.addAll(noticeContent);
		
		ArrayList<String> noticeContentComment = NoticeContentComment.getFilters();		
		filters.addAll(noticeContentComment);
		
		ArrayList<String> noticeBlog = NoticeBlog.getFilters();		
		filters.addAll(noticeBlog);
		
		ArrayList<String> noticeWiki = NoticeWiki.getFilters();		
		filters.addAll(noticeWiki);
		
		ArrayList<String> noticeForum = NoticeForum.getFilters();		
		filters.addAll(noticeForum);
		
		ArrayList<String> noticeUser = NoticeUser.getFilters();		
		filters.addAll(noticeUser);		
		
		ArrayList<String> noticeUserTagging = NoticeUserTagging.getFilters();		
		filters.addAll(noticeUserTagging);		
		
		return filters;
	}
}

class NoticeContent{
	protected static final String CONTENT = "content";
	protected static final String CONTENT_NEW = "content.new";
	protected static final String CONTENT_UPDATE = "content.update";
	
	protected static ArrayList<String> getFilters(){
		ArrayList<String> filters = new ArrayList<String>();
		filters.add(CONTENT);
		filters.add(CONTENT_NEW);
		filters.add(CONTENT_UPDATE);
		return filters;
	}
}

class NoticeContentComment{
	protected static final String COMMENT_CONTENT = "commentcontent";
	protected static final String COMMENT_CONTENT_NEW = "commentcontent.new";
	protected static final String COMMENT_CONTENT_UPDATE = "commentcontent.update";
	
	protected static ArrayList<String> getFilters(){
		ArrayList<String> filters = new ArrayList<String>();
		filters.add(COMMENT_CONTENT);
		filters.add(COMMENT_CONTENT_NEW);
		filters.add(COMMENT_CONTENT_UPDATE);
		return filters;
	}
}

class NoticeBlog{
	protected static final String BLOG = "blog";
	protected static final String COMMENT_POST = "commentpost";
	protected static final String POST = "post";
	
	protected static ArrayList<String> getFilters(){
		ArrayList<String> filters = new ArrayList<String>();
		filters.add(BLOG);
		filters.add(COMMENT_POST);
		filters.add(POST);
		return filters;
	}	
}

class NoticeWiki{
	protected static final String WIKI = "wiki";
	protected static final String WIKI_NEW = "wiki.new";
	protected static final String WIKI_UPDATE = "wiki.update";
	
	protected static ArrayList<String> getFilters(){
		ArrayList<String> filters = new ArrayList<String>();
		filters.add(WIKI);
		filters.add(WIKI_NEW);
		filters.add(WIKI_UPDATE);
		return filters;
	}
}

class NoticeForum{
	protected static final String FORUM = "forum";
	protected static final String FORUM_NEW = "forum.new";
	protected static final String FORUM_UPDATE = "forum.update";
	
	protected static ArrayList<String> getFilters(){
		ArrayList<String> filters = new ArrayList<String>();
		filters.add(FORUM);
		filters.add(FORUM_NEW);
		filters.add(FORUM_UPDATE);
		return filters;
	}
}

class NoticeUser{
	protected static final String USER_NEW = "user.new";
	
	protected static ArrayList<String> getFilters(){
		ArrayList<String> filters = new ArrayList<String>();
		filters.add(USER_NEW);
		return filters;
	}
}

class NoticeUserTagging{
	protected static final String USERTAG = "usertag";
	protected static final String USERTAG_SELF = "usertag.self";
	protected static final String USERTAG_SELF_NEW = "usertag_self.new";
	protected static final String USERTAG_SELF_DELETE = "usertag.self.delete";
	protected static final String USERTAG_USER = "usertag.user";
	protected static final String USERTAG_USER_NEW = "usertag.user.new";
	protected static final String USERTAG_USER_APPROVE = "usertag.user.approve";
	protected static final String USERTAG_USER_REJECT = "usertag.user.reject";
	protected static final String USERTAG_USER_DELETE = "usertag.user.delete";	
	
	protected static ArrayList<String> getFilters(){
		ArrayList<String> filters = new ArrayList<String>();
		filters.add(USERTAG);
		filters.add(USERTAG_SELF);
		filters.add(USERTAG_SELF_NEW);
		filters.add(USERTAG_SELF_DELETE);
		filters.add(USERTAG_USER);
		filters.add(USERTAG_USER_NEW);
		filters.add(USERTAG_USER_APPROVE);
		filters.add(USERTAG_USER_REJECT);
		filters.add(USERTAG_USER_DELETE);
		return filters;
	}
}
